# Maintainer: Niklas Meyer <derlinkman@gmail.com>
pkgname=dovecot-fts-flatcurve
pkgver=1.0.0
pkgrel=0
pkgdesc="Dovecot FTS Flatcurve plugin (Xapian)"
url="https://github.com/slusarz/dovecot-fts-flatcurve"
arch="all"
license="LGPL-2.1-or-later"
depends_dev="$pkgname=$pkgver-r$pkgrel"
depends="dovecot xapian-core"
makedepends="
	autoconf
	automake
	dovecot-dev
	icu-dev
	libtool
	xapian-core-dev
	"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/slusarz/dovecot-fts-flatcurve/archive/refs/tags/v$pkgver.tar.gz"

prepare() {
	default_prepare
	./autogen.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-static
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
d6b4131752d7cc4b854257332a144e8fc687aa13e2431014ba5877598c414feeda3b9e2718df40f9e1e808e7e0b7c9efbcc668d97f8120fc06dc6280cab36f4d  dovecot-fts-flatcurve-1.0.0.tar.gz
"
